Apple, Macintosh, Finder and Balloon Help are trademarksor registered trademarks of Apple Computer, Inc.
Contents
• Introduction
• System Requirements and Installation
• Scanning
• Directory Window
• Saving and Opening Windows
• Palette Window
• File Filters• Built-In Filters
• Preferences
• Printing
• Miscellaneous
• Registering
• About the Author
• Disclaimer
Introduction
Welcome to PowerScan 2.0! This application started out as a hack that would list duplicate files on a friend’s harddisk. As always, computer programs grow far beyond initial expectations and PowerScan 1.0 was born. After releasing it to the public I got a lot of feedback and ideas for this version. Among other things were printing and better filtering very much asked for. Well, here it is!
Another thing supported in this version is Apple’s Thread Manager which gives you (kind of) multitasking when scanning and processing file lists.
Here’s a short summary of new features:
• Supports Thread Manager for multitasking. Scan and find duplicate files in several windows at the same time. PowerScan works in background so you can use other applications if you want to.
Thread Manager is not required to run PowerScan, but I strongly recommend you to install it.
• Completely redesigned user interface with a floating palette for easy access to settings and commands. You can select any font and size for document windows and columns can be resized or hidden.
• Much improved file filtering. This version can filter on filename, size, type, creator, creation and modification date. If this isn’t enough you can extend PowerScan with external filters that integrate seamlessly with built-in counterparts. Filter components can be grouped to force a logical AND relation in addition to the default OR.
• Using external modules called preprocessors you can process each file in some way before it’s handed over to PowerScan. For example, I have written a Compact Pro archive preprocessor which reads the contents of compressed archives transparently to PowerScan.
• PowerScan can save document windows in both text and native formats. This lets you reopen saved directories.
• Printing is now supported. You can set margins (in inches or cm depending on your system!), page header and print font. On-screen preview is available.
• Other small improvements such as ability to read version information from files (rather slow, though), movable dialog boxes, Finder interaction (select or open files) and more.
System Requirements and Installation
PowerScan needs System 7. (I have no plans to release a System 6-compatible version so please don’t ask me.) Memory use depends on how large folders you scan and how many windows you want to keep open. The default partition is set to 1 Mb and should be sufficient for normal use.
Installing PowerScan
Installation is very simple — just copy PowerScan to your harddisk. If you have any external addins they should go into a folder called “PowerScan Addins” that should be located where your application is or in the System folder (at the top level or in the Preferences or Extensions subfolders).
Installing Thread Manager
To install Thread Manager, drop it in the Extensions folder and reboot. This system extension is not included in the PowerScan package but can be downloaded from several online services such as AppleLink or ftp.apple.com. It will probably be included in the next release of the system software but until then you will have to get it yourself. If I get enough shareware money I will probably license it myself so I can distribute it in the PowerScan package.
Note Thread Manager has no effect on applications not written to support it. Thus, it will not magically make all programs multi-task much better than before. At present time I know of only a handful programs that support it (e.g., AutoCAD R12, Disk Charmer, QuickDraw GX), but hopefully this will improve in the near future.
Note Thread Manager has a small incompatibility with the Macintosh Plus. (Technical info: you can’t use Resource Manager in any other thread than the main one.) This means that you shouldn’t use Thread Manager with PowerScan on a Mac Plus.
Scanning
Starting a scan
You can start a scan operation in several ways:
• Click the “Scan Disk/Folder” button in the Commands pane of the floating palette.
• Select “Scan Disk/Folder” from the Commands menu.
• Type Command-N.
If you do as listed above you will get a dialog box where you can select the disk or folder you want to scan. Moreover, you can:
• Go to the Finder and drag-&-drop a folder or disk on top of the PowerScan icon.
• Insert a disk when PowerScan is the frontmost application. (This autoscan feature can be disabled in the floating palette.)
Scan window
When scanning starts a small window appears on the screen. It contains a “candy bar” to show that PowerScan is working, and a “Stop” button.
As soon as the directory is read the window is resized to show the file listing.
Directory Window
Changing column widths
The text at the top of the window shows which folder that was scanned. Right below are the column headers. Place the mouse pointer between two columns and drag to change the width.
After changing widths you can click the zoom box to resize the window to fit the visible columns.
Hiding and showing columns
Click the small popup arrow at the right edge of the window to display the columns menu. All columns that are visible are checked in the menu. Select a column title from the menu to hide or show it.
Hint Hold down the Option key before clicking the popup arrow to display the number of files and folders in the window and the memory it uses.
Scrolling
If the window contains more data than fits inside the window, use the scrollbars to move around.
Hint Hold down the Option key while scrolling to double the scroll speed. Hold down Option and Shift keys to quadruple the speed.
You can use the keyboard to navigate in windows if you like that better. Press the arrow keys (the hint above applies here as well) to scroll in each direction or, if you have an extended keyboard, press Home, End and Page Up/Down to move to the start or end or to scroll a page at a time respectively.
Finder interaction
When you double-click on a file or folder in a directory listing PowerScan will send a “Highlight Selection” Apple Event to the Finder. This shortcut is very useful when you have found a duplicate file and e.g. want to delete it.
Hint Hold down the Option key when double-clicking to send a “Open Selection” Apple Event to the Finder. This is the equivalent of launching the selected file or opening the selected folder.
Combining two directories
A feature that isn’t very apparent is that you can combine two (or more) directories into one. You can do this if you e.g. want to find duplicates among several scans.
Windows can only be combined if they are of the same type. This means you must combine two scan windows or two duplicate list windows. When the windows are combined the contents of the first window is appended to the end of the second window, leaving the first window unchanged.
To combine two windows, place the mouse pointer in the firstwindow and press down the mouse button. The pointer will turn into a hand and you can drag an outline of the window. Keep dragging until the hand is inside the destination window (which is highlighted if it is of the right type) and release the mouse button to append the directory.
Saving and Opening Windows
This version has improved saving functions — you can save a directory window in a format that PowerScan can read or as a text file that can be opened by your word processor.
Saving a directory
To save the frontmost window, select “Save As…” from the File menu. Select the file format you want to use from the popup menu in the save dialog box. Remember that PowerScan can only reopen the file if you save it in its native format, so use the Text option only when exporting to other applications.
Opening saved directories
To open a window saved in PowerScan format, either double-click the file in the Finder or use the “Open…” command in the File menu.
Note This version of PowerScan uses something called volume reference numbers for keeping track of which disk each file is located on. The problem is that these numbers are not guaranteed to stay the same when you eject a disk or reboot your computer.
The bottom line is that PowerScan might fail to find and highlight a file in a Finder window when you double-click it in a PowerScan directory listing. Unfortunately there is no simple solution to this problem.
Palette Window
The palette window is a floating window where all options can be changed. There are four panes in the palette: the PowerScan logo, Scan Options, Find Duplicates Options and Commands.
The palette window is hidden when you switch to another application. This behaviour is in conformity with the Macintosh user interface guidelines. If you instead want the palette to be visible when PowerScan is placed in the background you can set this in the Preferences dialog box which is described later on in this manual.
Hiding and showing palette panes
To save screen space on smaller screens and to reduce clutter you can hide and show each pane individually by clicking the small triangle to the left of the pane title.
Hint Hold down the Option key when clicking an arrow to hide or show all panes at once.
Hint Hold down the Option key and click in the title bar of the palette window to hide or show the logo pane.
Scan Options pane
Settings in this pane affect what PowerScan does when you scan a disk or folder.
Select the type of files you want to scan in the first popup menu:
• “Scan all files” includes every file in the directory listing.
• “Scan applications” includes applications and folders in the listing.
• “Scan documents” includes all files except applications in the listing.
• “Scan folders only” includes folders only and no files in the directory listing.
• “Scan with filter…” passes each file through a filter that you have designed. Select the filter you want to use from the second popup menu.
Hint Hold down the Option key while selecting a filter from the popup menu to go to the Edit File Filters dialog box.
Below the popup menus are a couple of checkboxes:
• When “Limit scan to X levels” is checked PowerScan will not go deeper than X folder levels (counted from the starting level) when scanning.
• Check “Auto disk scan” to automatically scan all disks (such as diskettes and CD-ROMs) that are inserted while PowerScan is the frontmost application. When scanning is completed the disk will be ejected.
Hint If the disk is larger than about 3 Mb PowerScan will ask you to confirm that you really want to autoscan it. You can bypass this dialog by holding down the Option key while inserting the disk.
• If “No empty folders” is checked only folders that contain files will be included in the directory listing.
• Check “Read version info” to read version information stored in most application and system files. Note that when enabled it will slow down scanning considerably as each file must be opened to extract the version data.
Find Duplicates Options pane
By checking the boxes in this pane you tell PowerScan what file information it should compare when looking for duplicate files.
For example, by using the settings as pictured here PowerScan will treat two files with identical names, types and creators as duplicates even though their sizes may be different.
You must have at least one checkbox checked in order to find duplicates. Note that checking more checkboxes speeds up the duplicates search process. Using Name alone really slows down sorting.
Options settings and Thread Manager
In case you have the Thread Manager installed you will notice that you can change the settings in the palette window, or even edit file filters while a scan or find duplicates operation is processing. This will not affect operations that are running. For example, it is possible to delete the filter used in a running scan operation and still get the correct result.
Commands Pane
The last pane in the palette has a number of buttons. All of these commands can also be found in the Commands menu (with the same keyboard equivalents).
• The “Scan Disk/Folder…” button has been discussed in the “Scanning” chapter earlier in this manual.
• The “Search…” button opens a dialog box where you can enter a text string to search for. When searching is finished all files matching the text will be highlighted.
The different search methods are the same as for the built-in filename filter which is described later on in this manual.
Hint Hold down the Option key (or type Command-Option-F) to repeat last search in the currently active window.
• Use the “Find Duplicates” button to open a new window where all duplicate files in the current window are listed. While this operation is running you can’t close the original window.
• The “Apply Filter…” button presents the dialog box shown below. It lets you filter files after they have been scanned, and you can apply a filter to the active or all windows at the same time.
Use the bottom popup menu to select if the results after filtering should replace the contents of those windows that you are filtering or be placed in a new window. Note that if you use the former option there is no way of undoing the operation.
File Filters
File filters are what give PowerScan real power. You can build simple or complex filters by dragging and dropping, and even perform advanced tasks such as embedding filters inside each other.
What is a filter?
Let’s start at the beginning. A file filter defines a set of rules that decide whether a file should be included in the directory listing or not. It could be something as simple as “Size is larger than 250 Kb” or “Name ends with ‘copy’” or a combination of several rules.
Filter components
If a filter contains more than one rule (i.e., filter component), PowerScan implies a logical OR among the components. This means it will stop filter evaluation as soon as it finds that a file passes at least one filter component. To get a logical AND you must group components together.
For example, if you want to find all files that are between 200 and 300 Kb in size you need a filter with two components:
• Size is larger than 199 Kb
• Size is smaller than 301 Kb
These components must be grouped together for PowerScan to understand that both of them should be true before a file is added to the directory.
Editing file filters
To edit filters, select “Edit File Filters…” from the Edit menu.
Hint If you want to edit an existing file filter you can hold down the Option key and select the filter from the floating palette.
The dialog is divided in two parts — to the left is a list of available filters and to the right is the part where a single filter is displayed and edited.
The icon list at the bottom right shows all filter addins (built-in and external) that are available. These are the building blocks used to create a filter.
We can, for example, create the 200-300 Kb size filter described earlier. Start by clicking the “New…” button to add a new filter to the list. Name this filter “200-300 Kb” or whatever you think is appropriate.
Now drag the icon called “Size” from the icon list to the filter components list. This adds a size filter component to our new filter. Click the “Settings” button (or double-click the component) to configure it. Select “larger than” from the popup menu, type “199” in the text field and close the settings dialog box.
Repeat the procedure above for the next component — “Size is smaller than 301 Kb”. Finally group both components using Shift-clicks and click the “Group” button.
Hint Use Command-click to create a discontinuous selection of filter components that you want to group.
Hint Click on the grouping bracket to select all components of a group.
Note Grouped components must be ungrouped before you can delete them or include them in other groups. There is only one level of grouping but this can be circumvented by using the filter embedding feature described below.
Embedding filters
PowerScan lets you place a filter inside another filter. This feature gives you additional levels of grouping and also has the benefit of hiding the complexity of more advanced filters.
There is no limit on the number of times you can embed filters. The only constraint is that you must not create circular references. If a circular reference is found at scan time, PowerScan will show an error message.
To create an embedded filter, simply drag the filter from the left-hand list in the Edit File Filters dialog to the components list. The embedded filter will be displayed in italics.
Using embedding to create complex logical expressions
Embedded filters can be included in groups just like ordinary components. Using a combination of embedding and grouping you can create complex logical expressions — in several levels if needed.
Built-In Filters
PowerScan comes with a number of built-in filters. Here’s a brief description of what each one does:
Name
Use this filter to find files whose filenames match the string you enter in various ways. E.g., it is possible to test for “comes before” or “comes after” for matching a range of names.
Size
The size filter compares file sizes to your entered size. All calculations are done i Kb. Note that the “smaller than” and “larger than” comparisons are strict which means that they won’t include sizes that are exactly the same as the one you specify.
Type
This is the file types filter. To enter a filetype which you don’t know, click the “Get from file…” button and select the file. This is also useful for files whose file types contain non-writable characters (such as the invisible files used for custom folder icons).
Creator
The creator filter is analogous to the type filter above.
Creation date
To filter file creation dates, enter the date in the format used in you country (the date string is parsed by the system). Click the checkmark to verify that the date was valid and interpreted in the right way. The note about strict comparison mentioned earlier applies here as well.
Modification date
The modification date filter is analogous to the creation date filter above.
External filter addins
In addition to the filters listed here all external filters (placed in the PowerScan Addins folder) are shown when you open the Edit File Filters dialog box. Please see the documentation, if available, accompanying those addins for more information.
Preferences
Select “Preferences…” from the Edit menu to display this dialog box:
Window settings
Starting at the top-left is a checkbox where you can set whether you want the floating palette to be hidden when you put PowerScan in the background. Check the other checkbox to make PowerScan ask you if you want to save changes when you close a window.
Directory window font
Next comes two popup menus where you select the font and size used in directory windows. For faster screen updates, select a font and size for which you have a bitmap installed. Don’t worry if this font doesn’t print beautifully on your printer — it is possible to select a different print font in the Page Setup dialog box.
Text file settings
Further below is an edit field where you can enter the file creator code that PowerScan should use when saving text files. The popup menu lists a couple of common word processor and text editor creator codes — select one to put the corresponding creator code in the edit field.
Preprocessor addins
At the right-hand side of the dialog is a list where all external preprocessors are shown. You have the option of enabling and disabling them individually by selecting them and clicking the buttons below. Click the Info button to get a short description of what the selected preprocessor does.
Hint Disabling unused preprocessors will often speed up the scanning. You also need to disable a preprocessor if you e.g. want to scan for archive files without expanding their contents.
When you install a new preprocessor addin it will default to enabled.
What’s saved in the preferences file?
Preferences settings in the dialog box above, filter settings, page setup settings and palette window settings are stored in the PowerScan 2.0 Prefs file in the Preferences folder inside your system folder. If you have any problems with corrupted filters you can delete this file to restore default settings. Note that this will delete all filters permanently so don’t do it unless you really have to.
Printing
Using Page Setup
Before printing you need to select “Page Setup…” from the File menu to set your paper format, margins, page header and print font. These settings are saved so you don’t have to reset them every time you run PowerScan.
Margins are displayed in inches or centimeters depending on your system.
Previewing output
When you select “Print Preview” from the File menu you get an on-screen preview of what the output will look like.
You might have noticed that the paper has a light-colored (or gray pattern for you with monochrome monitors) border; this border represents the region of the page where your printer can’t print. Make sure the margins are big enough to avoid this region or the output will be clipped.
To step through the pages, click the Next or Previous buttons (or use the Page Up, Page Down, Home and End keys on your keyboard). You can also jump directly to the Page Setup or Print dialogs by clicking the appropriate buttons.
Printing
Select “Print…” from the File menu to print the frontmost document window.
PowerScan will resize the columns in the window to fit all data when you print. To ensure that everything fits within the paper width, use the Print Preview feature described above.
Miscellaneous
Balloon Help
PowerScan fully supports Balloon Help. Select “Show Balloons” from the Help menu and move the mouse pointer to any button, window area or menu item to display help information.
Option key shortcuts
If you have read this far it should come as no surprise that the Option key is used for various shortcuts. Here are some more:
• Hold down the Option key when PowerScan is launching to skip the loading status window.
• If the Option key is down when dragging a window PowerScan will continue to run active threads! This requires Thread Manager, of course.
• Open Print Preview or Edit File Filters dialogs with the Option key down to get a smaller dialog variant (designed for 9" screens). Useful if you want to save some screen space.
Other stuff
• Type Command-[first letter in button title] to click buttons (including radio buttons and checkboxes) in dialogs. Pressing Return or Enter are equivalent of clicking the outlined button and Escape is linked to the Cancel button.
• Option key shortcuts used when clicking buttons or selecting menu items also work with keyboard equivalents. E.g., Command-Option-F repeats the last search. (This should work on all international keyboards as well.)
• Even if you have a modal dialog box visible it is possible to move windows beneath by dragging their title bars.
Registering
PowerScan is shareware — it does not mean you get it for free! If you use this application for more than 15 days, please register it.
To register, follow these steps:
• Select “Register PowerScan…” from the Edit menu to display the registration dialog box. Write down the seed code which is displayed at the top. This is a special code which must be included when registering your copy of PowerScan as it is used to calculate the correct registration code.
• Send $10 (cash preferably) and the seed code to me. Remember to include any e-mail addresses (such as Internet, AppleLink or CompuServe) that you use so I can return the registration code as fast as possible. If you don’t have access to electronic mail, a fax number or snail-mail address is needed.
• When you receive the registration code, open the registration dialog box again and enter your name and the code. Click the “Register” button to save your name permanently. The application must be unlocked and located on an writable disk or this procedure won’t work.
Note After you have registered, but before you have received the registration code, you should not delete the PowerScan 2.0 Prefs file. If you do, a new seed code will be created which in turn means that a different code is needed to register the application. After registering, though, you can safely delete the preferences file without removing your name.
Note If you’ve already registered version 1.0, please contact me for a registration key. No money is needed, but don’t forget the seed code!
Installing new versions
If you are installing a new version of PowerScan you should copy the registration information from your old program by clicking the “Use old…” button. Just locate the old version and PowerScan will do the rest.
Sharing PowerScan with your friends
You can give unregistered copies to your friends as long as you don’t charge for it. Please include this manual when copying.
If you are interested in using PowerScan in any commercial distribution (e.g., shareware disks or CD-ROMs), please contact me first and we will work something out.
…and where should I send the money ?
Send money, questions, bug reports, feature requests, and Quadra 840av:s to:
Snail-mail
Jonas WalldénRydsvagen 252 c:11S-582 51 LinkopingSweden
E-mail
Internet: jonasw@lysator.liu.seAppleLink: sw1369
About the Author
I’m a 21-year-old Swede studying Computer Science at the Linkoping Institute of Technology (part of University of Linkoping). I have completed two years and have at least 2.5 years left…
At the moment I’m taking a break in my study period to do my military service (mandatory for all Swedish males). Unfortunately this will occupy most of my time until next summer leaving very little time for programming. I will try to read e-mail at least once a week if anyone wants to get in touch with me.
Disclaimer
I make no warranties, either expressed or implied, with respect to this software. It is provided as is and no responsibility or liability is taken for any damage or loss of data caused by using this software.